package com.cqrt.schedule;

import com.cqrt.service.ProjectLinkService;
import com.github.pagehelper.PageInfo;
import com.hustcad.plm.pdm.container.model.vo.search.ProjectEntityVO;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.PersistJobDataAfterExecution;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
@Component
@Slf4j
public class UpdateProjectPlanStateSchedule {

    @Resource
    private ProjectLinkService projectLinkService;

    @Scheduled(cron = "0 0 0 * * ?")
    public void updateProjectPlanState() {
        projectLinkService.updateCriticalTaskState();
    }
}
